package com.prj.ufdm.cloud.ms.core.enums.code;
/**
 * DESC: 职业（使用国标，标准号：	GB/T 2261.4-2003）
 * @author 胡义振
 */
public enum OccupationEnum {
	
	OCCUPATION_11("11","国家公务员"),
	OCCUPATION_13("13","专业技术人员"),
	OCCUPATION_17("17","职员"),
	OCCUPATION_21("21","企业管理人员"),
	OCCUPATION_24("24","工人"),
	OCCUPATION_27("27","农民"),
	OCCUPATION_31("31","学生"),
	OCCUPATION_37("37","现役军人"),
	OCCUPATION_51("51","自由职业者"),
	OCCUPATION_54("54","个体经营者"),
	OCCUPATION_70("70","无业人员"),
	OCCUPATION_80("80","退（离）休人员"),
	OCCUPATION_90("90","其他");
	
	private String code;
	private String message;
	
	OccupationEnum(String code,String message){
		this.code = code;
		this.message = message;
	}

	/**
	 * DESC: 根据值获取名称
	 * @param retCode
	 * @return
	 */
	public static String getRetMessage(String retCode){
		String rtnRetCode = "";
		for (OccupationEnum codeGenerate : OccupationEnum.values()) {
			if(codeGenerate.code.equals(retCode)){
				rtnRetCode = codeGenerate.message;
			}
	    }
		return rtnRetCode;
	}
	
	/**
	 * 
	 * DESC: 根据名称获取值
	 * @param retMessage
	 * @return
	 */
	public static String getRetValue(String retMessage){
		String rtnRetCode = "";
		for (OccupationEnum codeGenerate : OccupationEnum.values()) {
			if(codeGenerate.message.equals(retMessage)){
				rtnRetCode = codeGenerate.code;
			}
	    }
		return rtnRetCode;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
